package com.vay.de.dang.online.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public final class VnExecutors {

    private static ExecutorService mExecutors;
    private static ExecutorService mSingleExecutors;

    public static void init() {
        mExecutors = Executors.newFixedThreadPool(3);
        mSingleExecutors = Executors.newSingleThreadExecutor();
    }

    public static void execSingle(Runnable runnable) {
        if (runnable != null) {
            mSingleExecutors.execute(runnable);
        }
    }

    public static void execTask(Runnable runnable) {
        if (runnable != null) {
            mExecutors.execute(runnable);
        }
    }

}
